<!--<script>
    var ws = new WebSocket("ws://127.0.0.1:7272");
    ws.onopen = function () {
        console.log("连接成功");
    };
    ws.onmessage = function (e) {
        console.log("收到服务端的消息：" + e.data);
    };

    ws.onclose = function () {
        // 关闭 websocket
        console.log("连接已关闭...");
        ws = new WebSocket("ws://127.0.0.1:7272");
        ws.onopen = function () {
            console.log("重新连接成功");
        };
    };



    //定时发送信息告诉客户端我还活着 避免被踢
    window.setInterval(say_hello, 8000);
    function say_hello() {
        console.log('ping');
        ws.send('heartbeat');
    }
</script>-->